<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/apps/${entityName?lower_case}/input.css" type="text/css" rel="stylesheet" />
<script src="scripts/apps/${entityName?lower_case}/input.js" type="text/javascript"></script>
</head>
<body>
<div class="${entityName?lower_case}Panel">
<fieldset>
<legend>编辑</legend>
<ul>  
  <#list formfields?keys as fkey>
    <li>    
    <#assign fds=formfields[fkey] >
    <#assign t = fds["type"] >
    <#assign name = fds["name"] >
    <#assign label = fds["label"] >
    <#assign sid = fds["id"] >
    <#assign val = fds["value"] >
    <label>${label}
    <#switch t?lower_case>
  		<#case "textfield">
  	      <input id="${sid}" name="${name}" value="${val}" /> 
          <#break>
        <#case "password">
          <input id="${sid}" type="password" name="${name}" value="${val}" /> 
          <#break>
        <#case "hidden">
          <input id="${sid}" type="hidden" name="${name}" value="${val}" /> 
          <#break>
        <#case "radio">
          <textarea id="${sid}" type="radio" name="${name}"></textarea>
        <#break> 
        <#case "checkbox">
          <textarea id="${sid}" type="checkbox" name="${name}"></textarea>
        <#break> 
        <#case "list">
          <select id="${sid}" name="${name}" size="5"></select>
        <#break> 
        <#case "select">
          <select id="${sid}" name="${name}"></select>
        <#break> 
        <#case "textarea">
          <textarea id="${sid}" name="${name}"></textarea>
        <#break> 
        <#default>
          <input id="${sid}" name="${name}" value="${val}" /> 
    </#switch> 
    </label>
    </li>
  </#list>
</ul>
<div class="toolbar-small"><button type="button" id="saveBtn">保存</button><button type="reset">重置</button></div>
</fieldset>
</form>
</div>
</body>
</html>